﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class cn_about : System.Web.UI.Page
{
    protected string _cid = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        Control ctr = null;
        string mode = Request.QueryString["mode"];
        switch (mode)
        {
            case "ztactive": ctr = this.LoadControl("common/menu_ztactive.ascx"); break;
            case "jnews": ctr = this.LoadControl("common/menu_jnews.ascx"); break;
            case "pxnews": ctr = this.LoadControl("common/menu_pxnews.ascx"); break;
            case "kfu": ctr = this.LoadControl("common/menu_kfu.ascx"); break;
            case "kbjd": ctr = this.LoadControl("common/menu_kbjd.ascx"); break;
           
            default: ctr = this.LoadControl("common/menu_about.ascx"); break;
        }

        panne1.Controls.Add(ctr);

        _cid = Request.QueryString["cid"];
        if (string.IsNullOrEmpty(_cid))
        {
            _cid = ColumnHelp.GetFirstColumnId(3);
        }
        else
        {
            if (!Whir.Common.WebHelper.Utils.IsInt(_cid))
                _cid = ColumnHelp.GetFirstColumnId(3);
        }

        if (!IsPostBack)
        {
            GetTipsInfo();
            GetSinglePageInfo();
        }
    }

    private void GetSinglePageInfo()
    {
        string url = string.Format("news.aspx?cid={0}&mode=about", _cid);
        ColumnHelp.getReader(_cid, url, ColumnHelp.ModuleMarkMode.List);
        ltrContent.Text = ColumnHelp.GetSinglePageContent(_cid);
    }

    private void GetTipsInfo()
    {
        ltrTips.Text =ColumnHelp.GetColumnName(_cid);
    }

  


    
}
